package com.ngc.mall.bo;

import lombok.Data;

/**
 * 处理redis存储的key，转换为订单信息
 */
@Data
public class OrderMessageBO {
    private Long couponId;
    private Long userId;
    private Long orderId;
    private String message;
    public OrderMessageBO(String message) {
        this.message=message;
        this.parseMessage(message);
    }
    private void parseMessage(String message){
        String[] temp=message.split(",");
        this.couponId=Long.valueOf(temp[0]);
        this.orderId=Long.valueOf(temp[1]);
        this.userId=Long.valueOf(temp[2]);
    }
}
